function R = calc_obs_cov(pos_cart,sigma_ra,sigma_az,origin)


% Calculate obs noise covariance (around predicted pos)
p   = cart2pol(pos_cart, origin);
ra = p(1); az = p(2);
s11 = sigma_ra^2*cos(az)^2 + sigma_az^2*ra^2*sin(az)^2;
s22 = sigma_ra^2*sin(az)^2 + sigma_az^2*ra^2*cos(az)^2;
s12 = 0.5*sin(2*az)*(sigma_ra^2 - sigma_az^2*ra^2);
R   = [s11 s12; s12 s22];